package com.neoharvest.smartagri.model.impl;

import com.neoharvest.smartagri.model.AgriculturalMachine;

public class SeederMachine implements AgriculturalMachine {
    private String position = "0,0";
    private double fuelLevel = 100.0;

    @Override
    public void start() {
        System.out.println("Seeder Machine: Starting...");
    }

    @Override
    public void stop() {
        System.out.println("Seeder Machine: Stopping...");
    }

    @Override
    public void executeTask() {
        System.out.println("Seeder Machine: Executing seeding task...");
        this.fuelLevel -= 5.0;
    }

    @Override
    public String getStatus() {
        return "Seeder Machine: Ready";
    }

    @Override
    public String getPosition() {
        return position;
    }

    @Override
    public double getFuelLevel() {
        return fuelLevel;
    }

    @Override
    public void updatePosition(String position) {
        this.position = position;
        System.out.println("Seeder Machine position updated to: " + position);
    }

    @Override
    public void updateFuelLevel(double fuelLevel) {
        this.fuelLevel = fuelLevel;
        System.out.println("Seeder Machine fuel level updated to: " + fuelLevel);
    }
    
    @Override
    public String getCurrentTask() {
        return "播种任务";
    }
}